home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat2 / standard / kill.z / kill
Encoding:
Text File  |  1998-10-20  |  4.8 KB  |  133 lines

  1.  
  2.  
  3.  
  4. KKKKIIIILLLLLLLL((((2222))))                                                                KKKKIIIILLLLLLLL((((2222))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      kill - send a signal to a process or a group of processes
  10.  
  11. CCCC SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ttttyyyyppppeeeessss....hhhh>>>>
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssiiiiggggnnnnaaaallll....hhhh>>>>
  14.  
  15.      iiiinnnntttt kkkkiiiillllllll ((((ppppiiiidddd____tttt ppppiiiidddd,,,, iiiinnnntttt ssssiiiigggg))));;;;
  16.  
  17. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      _k_i_l_l sends a signal to a process or a group of processes.  The process or
  19.      group of processes to which the signal is to be sent is specified by _p_i_d.
  20.      The signal that is to be sent is specified by _s_i_g and is either one from
  21.      the list given in _s_i_g_n_a_l(2), or 0.  If _s_i_g is 0 (the null signal), error
  22.      checking is performed but no signal is actually sent.  This can be used
  23.      to check the validity of _p_i_d.
  24.  
  25.      The real or effective user ID of the sending process must match the real,
  26.      saved,  or effective user ID of the receiving process, unless the
  27.      effective user ID of the sending process is super-user.  An exception to
  28.      this is the signal SSSSIIIIGGGGCCCCOOOONNNNTTTT, which may be sent to any descendant, or any
  29.      process in the same session (having the same session ID) as the current
  30.      process.
  31.  
  32.      The processes with a process ID of 0 and a process ID of 1 are special
  33.      processes [see _i_n_t_r_o(2)] and will be referred to below as _p_r_o_c_0 and
  34.      _p_r_o_c_1, respectively.
  35.  
  36.      If _p_i_d is greater than zero, _s_i_g will be sent to the process whose
  37.      process ID is equal to _p_i_d.  _P_i_d may equal 1.
  38.  
  39.      If _p_i_d is 0, _s_i_g will be sent to all processes excluding _p_r_o_c_0 and _p_r_o_c_1
  40.      whose process group ID is equal to the process group ID of the sender.
  41.  
  42.      If _p_i_d is -1 and the effective user ID of the sender is not super-user,
  43.      _s_i_g will be sent to all processes excluding _p_r_o_c_0 and _p_r_o_c_1 whose real
  44.      user ID is equal to the effective user ID of the sender.
  45.  
  46.      If _p_i_d is -1 and the effective user ID of the sender is super-user, _s_i_g
  47.      will be sent to all processes excluding _p_r_o_c_0 and _p_r_o_c_1.
  48.  
  49.      If _p_i_d is negative but not -1, _s_i_g will be sent to all processes whose
  50.      process group ID is equal to the absolute value of _p_i_d.
  51.  
  52.      If the value of _p_i_d causes _s_i_g to be generated for the sending process,
  53.      and if _s_i_g is not blocked for the calling thread and if no other thread
  54.      has _s_i_g unblocked or is waiting in a _s_i_g_w_a_i_t function for _s_i_g, either _s_i_g
  55.      or at least one pending unblocked signal shall be delivered to the
  56.      calling thread before the _k_i_l_l() function returns.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. KKKKIIIILLLLLLLL((((2222))))                                                                KKKKIIIILLLLLLLL((((2222))))
  71.  
  72.  
  73.  
  74.      _k_i_l_l will fail and no signal will be sent if one or more of the following
  75.      are true:
  76.  
  77.      [EINVAL]       _S_i_g is not a valid signal number.
  78.  
  79.      [EPERM]        _S_i_g is SIGKILL and _p_i_d is 1 (proc1).
  80.  
  81.      [ESRCH]        No process can be found corresponding to that specified by
  82.                     _p_i_d.
  83.  
  84.      [ESRCH]        The process group was given as 0 but the sending process
  85.                     does not have a process group.
  86.  
  87.      [EPERM]        The user ID of the sending process is not super-user, and
  88.                     its real or effective user ID does not match the real,
  89.                     saved,  or effective user ID of the receiving process.
  90.  
  91. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  92.      kill(1), exec(2), getpid(2), setpgrp(2), setsid(2), signal(2), sigset(2),
  93.      sigaction(2), sigprocmask(2), sigqueue(3), sigwait(3), sigvec(3B),
  94.      sigblock(3B), sigsetmask(3B), killpg(3B), pthread_kill(3P)
  95.  
  96. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCC
  97.      Upon successful completion, a value of 0 is returned.  Otherwise, a value
  98.      of -1 is returned and _e_r_r_n_o is set to indicate the error.
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.